package com.ruoyi.system.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 编码规则段配置对象 sys_coding_rule_segment
 * 
 * @author ruoyi
 * @date 2025-08-08
 */
public class SysCodingRuleSegment extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 段ID */
    private Long segmentId;

    /** 规则ID */
    @Excel(name = "规则ID")
    private Long ruleId;

    /** 段顺序 */
    @Excel(name = "段顺序")
    private Long segmentOrder;

    /** 段类型(CONSTANT:常量,SERIAL:流水号,DATE:日期,TIMESTAMP:时间戳) */
    @Excel(name = "段类型(CONSTANT:常量,SERIAL:流水号,DATE:日期,TIMESTAMP:时间戳)")
    private String segmentType;

    /** 段值配置 */
    @Excel(name = "段值配置")
    private String segmentValue;

    /** 日期格式(如:yyyyMMdd,yyyy,yyyyMM) */
    @Excel(name = "日期格式(如:yyyyMMdd,yyyy,yyyyMM)")
    private String dateFormat;

    /** 时间戳截取长度 */
    @Excel(name = "时间戳截取长度")
    private Long timestampLength;

    /** 流水号长度 */
    @Excel(name = "流水号长度")
    private Long serialLength;

    /** 流水号起始值 */
    @Excel(name = "流水号起始值")
    private Long serialStart;

    /** 重置类型(NONE:不重置,DAILY:每日,MONTHLY:每月,YEARLY:每年) */
    @Excel(name = "重置类型(NONE:不重置,DAILY:每日,MONTHLY:每月,YEARLY:每年)")
    private String resetType;

    public void setSegmentId(Long segmentId) 
    {
        this.segmentId = segmentId;
    }

    public Long getSegmentId() 
    {
        return segmentId;
    }

    public void setRuleId(Long ruleId) 
    {
        this.ruleId = ruleId;
    }

    public Long getRuleId() 
    {
        return ruleId;
    }

    public void setSegmentOrder(Long segmentOrder) 
    {
        this.segmentOrder = segmentOrder;
    }

    public Long getSegmentOrder() 
    {
        return segmentOrder;
    }

    public void setSegmentType(String segmentType) 
    {
        this.segmentType = segmentType;
    }

    public String getSegmentType() 
    {
        return segmentType;
    }

    public void setSegmentValue(String segmentValue) 
    {
        this.segmentValue = segmentValue;
    }

    public String getSegmentValue() 
    {
        return segmentValue;
    }

    public void setDateFormat(String dateFormat) 
    {
        this.dateFormat = dateFormat;
    }

    public String getDateFormat() 
    {
        return dateFormat;
    }

    public void setTimestampLength(Long timestampLength) 
    {
        this.timestampLength = timestampLength;
    }

    public Long getTimestampLength() 
    {
        return timestampLength;
    }

    public void setSerialLength(Long serialLength) 
    {
        this.serialLength = serialLength;
    }

    public Long getSerialLength() 
    {
        return serialLength;
    }

    public void setSerialStart(Long serialStart) 
    {
        this.serialStart = serialStart;
    }

    public Long getSerialStart() 
    {
        return serialStart;
    }

    public void setResetType(String resetType) 
    {
        this.resetType = resetType;
    }

    public String getResetType() 
    {
        return resetType;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("segmentId", getSegmentId())
            .append("ruleId", getRuleId())
            .append("segmentOrder", getSegmentOrder())
            .append("segmentType", getSegmentType())
            .append("segmentValue", getSegmentValue())
            .append("dateFormat", getDateFormat())
            .append("timestampLength", getTimestampLength())
            .append("serialLength", getSerialLength())
            .append("serialStart", getSerialStart())
            .append("resetType", getResetType())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
